#version 330 core

out vec4 FragColor;

in vec3 ourColor;
in vec2 TexCoord;

uniform sampler2D ourTexture1;
uniform sampler2D ourTexture2;
uniform int type;

void main() {
    if (type == 1) {
        FragColor = texture(ourTexture1, TexCoord) * vec4(ourColor, 1.0);
    } else if (type == 2) {
        FragColor = vec4(ourColor, 1.0);
    } else if (type == 3) {
        FragColor = mix(texture(ourTexture2, TexCoord), texture(ourTexture1, TexCoord), 0.2);
    } else {
        FragColor = texture(ourTexture1, TexCoord);
    }
}
